home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
FROMUTS
/
MAKEAPPL
/
!MakeAppl
/
!Help
< prev
next >
Wrap
Text File
|
1990-06-06
|
8KB
|
170 lines
!MakeAppl, version 0.90 5th June 1990
=====================================
*************************** Copyright Notice **************************
* *
* The source code and documentation for the 'BASIC -> Application' *
* utility are the exclusive copyright of Michael Ben-Gershon and are *
* freely distributable, provided this notice is left intact and all *
* of the files listed below are included, UNALTERED. *
* *
*************************************************************************
Included :-
!Boot
!Run
!RunImage
!Sprites
!Help (this file!)
!Config
Templates
Introduction:
=============
This program is a RISC OS utility that adds a header to BASIC files which
then lets them be treated as if they were 'Applications'. The main reason
for wanting to do this is that Applications may be 'squeezed' - if you
possess the Acorn 'squeeze' utility. It is supplied with C release 3 and the
Software Developer's Toolbox. You may have discovered that a few of the
Acorn-supplied programs on the RISC OS distribution discs were treated in
this way - for example, !Help.
There are many good reasons for doing this. Firstly, as Acorn point out in
their documentation, squeezed programs take up less space on disc. For
example, the !RunImage file supplied with this application is reduced from
25k to 18k. The !RunImage file in !Maestro is reduced from 93k to 69k.
Secondly, the Archimedes can 'unsqueeze' a 'squeezed' file faster than it
can be loaded off a disc (even a hard disc). Unsqueezing happens at about
1Mb per second on a standard Archimedes. With BASIC programs there is a
third advantage - prevention of 'hacking'. Many users like to hack about at
programs they have bought. The problem with this is that they often get
into a mess, through inexperience or through misunderstanding the style of
the original programmer. At this stage, they either blame the author, or
realise that they have lost the original version! Either way they will find
it difficult to get support from the author as the program has been modified
by them. All of this is eliminated with compiled languages as the source is
no longer visible to the user. By putting interpreted BASIC programs
through !MakeAppl with the squeeze option set, the user will assume that the
program was generated by a compiled language, and unless they are pretty
expert they will be unable to do any damage! An expert user will probably
know how to get round this, but they will probably know what they are doing
anyway...
Installation and use:
=====================
Double-clicking on the !MakeAppl icon will install the application on the
icon bar in the usual manner. The mouse's centre 'menu' button gives a
choice of various options. Clicking on 'Squeeze' will ensure that any BASIC
program processed by the application is squeezed before saving. THIS
REQUIRES THE PRESENCE OF THE 'SQUEEZE' UTILITY IN THE LIBRARY (or somewhere
else pointed to by Run$Path). Clicking on 'Save status' will save the
current 'squeeze' status (on or off) in the !Config file in the !MakeAppl
directory. This file is essential to the workings of the program, and must
never be removed!
Dragging a BASIC file icon to the !MakeAppl icon on the icon bar will result
in a standard save box appearing, with a modified version of the filename in
it. This icon must be dragged to wherever it is to be saved to (usually
some filer window). !MakeAppl supports both memory and Wimp$Scrap transfer
protocols, and allocates the memory it requires from the RMA (or next/free
slots). For example, the application !B_to_T converts a text file to
tokenised BASIC (and back). It supports memory-memory transfers. A text
file containing a BASIC program may be dragged to its icon, then 'saved'
into !MakeAppl and then 'saved' into !Edit - all without ever saving an
intermediate file! (Note that some early versions of !B_to_T are riddled
with bugs, so this may not work with them!) Why anyone would ever want to
do such a thing is another question, but it is interesting...
Technical details:
==================
This program was written in BASIC, only because I haven't written a RISC OS
interface to ISO-Pascal yet! As a result, it has not been written like most
BASIC programs, but is as near as possible in its layout to a Pascal-like
program. Long procedure/variable names, plenty of indentation and lots of
blank space. Unfortunately, BASIC does not allow the creation of
user-defined data structures, so that area is a bit of a mess. It should be
more-or-less self-documenting, but I haven't had the time to comment it more
fully. I know that I ought to, but the original, non-desktop version was
only about 50 lines long and the desktop interface for it is just ENORMOUS!
I tend to be a bit of a perfectionist, so I just had to support both memory
and Wimp$Scrap protocols...
Having seen plenty of BASIC desktop source code, I am now convinced that
!MakeAppl breaks new ground in terms of its readability. It would be very
easy to use parts of its structure in other programs, and if you are still
confused by the memory and Wimp$Scrap transfer protocols (using messages)
you might find that this helps a bit, if followed together with pages
1261-1268 of the RISC OS Programmer's Reference Manual.
If you are worried about its use of memory, you could try putting it through
!Slash or something similar, but please keep the original version for
reference! I haven't tried this myself but you may be able to reduce the
WimpSlot usage this way.
Conditions of use:
==================
This software is supplied "as is"; no warranty, express or implied, of the
merchantability of this software or its fitness for any particular purpose
is given. In no circumstances shall the providers of this software be
liable for any damage, loss of profits, or any indirect or consequential
loss arising out of the use of this software or inability to use this
software.
You are free to give this application to anyone you please via any medium,
provided it is delivered with ALL the supplied files, UNALTERED. You may
NOT sell this software, or use it otherwise for personal gain. If you wish
to post it on your Bulletin Board or include it in your Shareware library
then that, too, is fine.
You have permission to use any part or the whole application in a project
you intend to place in the public domain, as long as I am fully credited. If
you wish to use these routines in a program that is for sale (for however
much and for whatever reasons) or released as copyright material then my
express permission in writing must be obtained. I maintain copyright on all
the material supplied and reserve the right to amend these conditions in
case where I deem misuse.
A large number of hours of work have gone into the production and
maintenance of this application and although I have supplied the application
free, donations will be gratefully received (and if over 7 pounds I will send
you a disc with updates of this and all other pd stuff I have written.
Please include a letter telling me which apps of mine you use and their
version numbers).
Please report any bugs you find to me, so that other users may benefit from
improved versions. I cannot guarantee to fix any bugs, but I will do my
best.
My address is:
Michael Ben-Gershon
8 Linnell Drive
LONDON NW11 7LT
No telephone calls please.
However, I can be contacted as:
Prestel (and SID): 014554781
Janet: umace03@doc.ic.ac.uk (until September 1990)
Archive BBS: 0603 745932 (mailbox 396)
The World of Cryton: 0749 670030 / 679794 (mailbox 100)
Thanks are due to Phil Colmer, David Spencer and Emmet Spier for ideas I
found in the source-code of their Desktop applications.
© Michael Ben-Gershon 1990 - USE and Enjoy!